﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using HANDLE = System.IntPtr;

namespace FsAddInManager.Utils.InitFile
{
/// <summary>
    /// Struct OVERLAPPED
    /// </summary>
    public struct OVERLAPPED
    {
        /// <summary>
        /// The internal
        /// </summary>
        public int Internal;

        /// <summary>
        /// The internal high
        /// </summary>
        public int InternalHigh;

        /// <summary>
        /// The offset
        /// </summary>
        public int offset;

        /// <summary>
        /// The offset high
        /// </summary>
        public int OffsetHigh;

        /// <summary>
        /// The h event
        /// </summary>
        public HANDLE hEvent;
    }

    /// <summary>
    /// Struct SECURITY_ATTRIBUTES
    /// </summary>
    public struct SECURITY_ATTRIBUTES
    {
        /// <summary>
        /// The n length
        /// </summary>
        public int nLength;

        /// <summary>
        /// The lp security descriptor
        /// </summary>
        public int lpSecurityDescriptor;

        /// <summary>
        /// The b inherit handle
        /// </summary>
        public int bInheritHandle;
    }

    /// <summary>
    /// Struct PROCESS_INFORMATION
    /// </summary>
    public struct PROCESS_INFORMATION
    {
        /// <summary>
        /// The h process
        /// </summary>
        public HANDLE hProcess;

        /// <summary>
        /// The h thread
        /// </summary>
        public HANDLE hThread;

        /// <summary>
        /// The dw process identifier
        /// </summary>
        public int dwProcessId;

        /// <summary>
        /// The dw thread identifier
        /// </summary>
        public int dwThreadId;
    }

    /// <summary>
    /// Struct COMMPROP
    /// </summary>
    public struct COMMPROP
    {
        /// <summary>
        /// The w packet length
        /// </summary>
        public short wPacketLength;

        /// <summary>
        /// The w packet version
        /// </summary>
        public short wPacketVersion;

        /// <summary>
        /// The dw service mask
        /// </summary>
        public int dwServiceMask;

        /// <summary>
        /// The dw reserved1
        /// </summary>
        public int dwReserved1;

        /// <summary>
        /// The dw maximum tx queue
        /// </summary>
        public int dwMaxTxQueue;

        /// <summary>
        /// The dw maximum rx queue
        /// </summary>
        public int dwMaxRxQueue;

        /// <summary>
        /// The dw maximum baud
        /// </summary>
        public int dwMaxBaud;

        /// <summary>
        /// The dw prov sub type
        /// </summary>
        public int dwProvSubType;

        /// <summary>
        /// The dw prov capabilities
        /// </summary>
        public int dwProvCapabilities;

        /// <summary>
        /// The dw settable parameters
        /// </summary>
        public int dwSettableParams;

        /// <summary>
        /// The dw settable baud
        /// </summary>
        public int dwSettableBaud;

        /// <summary>
        /// The w settable data
        /// </summary>
        public short wSettableData;

        /// <summary>
        /// The w settable stop parity
        /// </summary>
        public short wSettableStopParity;

        /// <summary>
        /// The dw current tx queue
        /// </summary>
        public int dwCurrentTxQueue;

        /// <summary>
        /// The dw current rx queue
        /// </summary>
        public int dwCurrentRxQueue;

        /// <summary>
        /// The dw prov spec1
        /// </summary>
        public int dwProvSpec1;

        /// <summary>
        /// The dw prov spec2
        /// </summary>
        public int dwProvSpec2;

        /// <summary>
        /// The wc prov character
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public short[] wcProvChar;
    }

    /// <summary>
    /// Struct COMSTAT
    /// </summary>
    public struct COMSTAT
    {
        /// <summary>
        /// The f bit fields
        /// </summary>
        public int fBitFields;

        /// <summary>
        /// The cb in que
        /// </summary>
        public int cbInQue;

        /// <summary>
        /// The cb out que
        /// </summary>
        public int cbOutQue;
    }

    /// <summary>
    /// Struct DCB
    /// </summary>
    public struct DCB
    {
        /// <summary>
        /// The dc blength
        /// </summary>
        public int DCBlength;

        /// <summary>
        /// The baud rate
        /// </summary>
        public int BaudRate;

        /// <summary>
        /// The f bit fields
        /// </summary>
        public int fBitFields;

        /// <summary>
        /// The w reserved
        /// </summary>
        public short wReserved;

        /// <summary>
        /// The xon lim
        /// </summary>
        public short XonLim;

        /// <summary>
        /// The xoff lim
        /// </summary>
        public short XoffLim;

        /// <summary>
        /// The byte size
        /// </summary>
        public byte ByteSize;

        /// <summary>
        /// The parity
        /// </summary>
        public byte Parity;

        /// <summary>
        /// The stop bits
        /// </summary>
        public byte StopBits;

        /// <summary>
        /// The xon character
        /// </summary>
        public byte XonChar;

        /// <summary>
        /// The xoff character
        /// </summary>
        public byte XoffChar;

        /// <summary>
        /// The error character
        /// </summary>
        public byte ErrorChar;

        /// <summary>
        /// The EOF character
        /// </summary>
        public byte EofChar;

        /// <summary>
        /// The evt character
        /// </summary>
        public byte EvtChar;

        /// <summary>
        /// The w reserved1
        /// </summary>
        public short wReserved1;
    }

    /// <summary>
    /// Struct COMMTIMEOUTS
    /// </summary>
    public struct COMMTIMEOUTS
    {
        /// <summary>
        /// The read interval timeout
        /// </summary>
        public int ReadIntervalTimeout;

        /// <summary>
        /// The read total timeout multiplier
        /// </summary>
        public int ReadTotalTimeoutMultiplier;

        /// <summary>
        /// The read total timeout constant
        /// </summary>
        public int ReadTotalTimeoutConstant;

        /// <summary>
        /// The write total timeout multiplier
        /// </summary>
        public int WriteTotalTimeoutMultiplier;

        /// <summary>
        /// The write total timeout constant
        /// </summary>
        public int WriteTotalTimeoutConstant;
    }

    /// <summary>
    /// Struct SYSTEM_INFO
    /// </summary>
    public struct SYSTEM_INFO
    {
        /// <summary>
        /// The dw oem identifier
        /// </summary>
        public int dwOemID;

        /// <summary>
        /// The dw page size
        /// </summary>
        public int dwPageSize;

        /// <summary>
        /// The lp minimum application address
        /// </summary>
        public int lpMinimumApplicationAddress;

        /// <summary>
        /// The lp maximum application address
        /// </summary>
        public int lpMaximumApplicationAddress;

        /// <summary>
        /// The dw active processor mask
        /// </summary>
        public int dwActiveProcessorMask;

        /// <summary>
        /// The dw number orf processors
        /// </summary>
        public int dwNumberOrfProcessors;

        /// <summary>
        /// The dw processor type
        /// </summary>
        public int dwProcessorType;

        /// <summary>
        /// The dw allocation granularity
        /// </summary>
        public int dwAllocationGranularity;

        /// <summary>
        /// The dw reserved
        /// </summary>
        public int dwReserved;
    }

    #region Global Memory Flags

    #endregion

    /// <summary>
    /// Struct MEMORYSTATUS
    /// </summary>
    public struct MEMORYSTATUS
    {
        /// <summary>
        /// The dw length
        /// </summary>
        public int dwLength;

        /// <summary>
        /// The dw memory load
        /// </summary>
        public int dwMemoryLoad;

        /// <summary>
        /// The dw total physical
        /// </summary>
        public int dwTotalPhys;

        /// <summary>
        /// The dw avail physical
        /// </summary>
        public int dwAvailPhys;

        /// <summary>
        /// The dw total page file
        /// </summary>
        public int dwTotalPageFile;

        /// <summary>
        /// The dw avail page file
        /// </summary>
        public int dwAvailPageFile;

        /// <summary>
        /// The dw total virtual
        /// </summary>
        public int dwTotalVirtual;

        /// <summary>
        /// The dw avail virtual
        /// </summary>
        public int dwAvailVirtual;
    }

    /// <summary>
    /// Struct GENERIC_MAPPING
    /// </summary>
    public struct GENERIC_MAPPING
    {
        /// <summary>
        /// The generic read
        /// </summary>
        public int GenericRead;

        /// <summary>
        /// The generic write
        /// </summary>
        public int GenericWrite;

        /// <summary>
        /// The generic execute
        /// </summary>
        public int GenericExecute;

        /// <summary>
        /// The generic all
        /// </summary>
        public int GenericAll;
    }

    /// <summary>
    /// Struct LUID
    /// </summary>
    public struct LUID
    {
        /// <summary>
        /// The low part
        /// </summary>
        public int LowPart;

        /// <summary>
        /// The high part
        /// </summary>
        public int HighPart;
    }

    /// <summary>
    /// Struct LUID_AND_ATTRIBUTES
    /// </summary>
    public struct LUID_AND_ATTRIBUTES
    {
        /// <summary>
        /// The p luid
        /// </summary>
        public LUID pLuid;

        /// <summary>
        /// The attributes
        /// </summary>
        public int Attributes;
    }

    /// <summary>
    /// Struct ACL
    /// </summary>
    public struct ACL
    {
        /// <summary>
        /// The acl revision
        /// </summary>
        public byte AclRevision;

        /// <summary>
        /// The SBZ1
        /// </summary>
        public byte Sbz1;

        /// <summary>
        /// The acl size
        /// </summary>
        public short AclSize;

        /// <summary>
        /// The ace count
        /// </summary>
        public short AceCount;

        /// <summary>
        /// The SBZ2
        /// </summary>
        public short Sbz2;
    }

    /// <summary>
    /// Struct ACE_HEADER
    /// </summary>
    public struct ACE_HEADER
    {
        /// <summary>
        /// The ace type
        /// </summary>
        public byte AceType;

        /// <summary>
        /// The ace flags
        /// </summary>
        public byte AceFlags;

        /// <summary>
        /// The ace size
        /// </summary>
        public int AceSize;
    }

    /// <summary>
    /// Struct ACCESS_ALLOWED_ACE
    /// </summary>
    public struct ACCESS_ALLOWED_ACE
    {
        /// <summary>
        /// The header
        /// </summary>
        public ACE_HEADER Header;

        /// <summary>
        /// The mask
        /// </summary>
        public int Mask;

        /// <summary>
        /// The sid start
        /// </summary>
        public int SidStart;
    }

    /// <summary>
    /// Struct ACCESS_DENIED_ACE
    /// </summary>
    public struct ACCESS_DENIED_ACE
    {
        /// <summary>
        /// The header
        /// </summary>
        public ACE_HEADER Header;

        /// <summary>
        /// The mask
        /// </summary>
        public int Mask;

        /// <summary>
        /// The sid start
        /// </summary>
        public int SidStart;
    }

    /// <summary>
    /// Struct SYSTEM_AUDIT_ACE
    /// </summary>
    public struct SYSTEM_AUDIT_ACE
    {
        /// <summary>
        /// The header
        /// </summary>
        public ACE_HEADER Header;

        /// <summary>
        /// The mask
        /// </summary>
        public int Mask;

        /// <summary>
        /// The sid start
        /// </summary>
        public int SidStart;
    }

    /// <summary>
    /// Struct SYSTEM_ALARM_ACE
    /// </summary>
    public struct SYSTEM_ALARM_ACE
    {
        /// <summary>
        /// The header
        /// </summary>
        public ACE_HEADER Header;

        /// <summary>
        /// The mask
        /// </summary>
        public int Mask;

        /// <summary>
        /// The sid start
        /// </summary>
        public int SidStart;
    }

    /// <summary>
    /// Struct ACL_REVISION_INFORMATION
    /// </summary>
    public struct ACL_REVISION_INFORMATION
    {
        /// <summary>
        /// The acl revision
        /// </summary>
        public int AclRevision;
    }

    /// <summary>
    /// Struct ACL_SIZE_INFORMATION
    /// </summary>
    public struct ACL_SIZE_INFORMATION
    {
        /// <summary>
        /// The ace count
        /// </summary>
        public int AceCount;

        /// <summary>
        /// The acl bytes in use
        /// </summary>
        public int AclBytesInUse;

        /// <summary>
        /// The acl bytes free
        /// </summary>
        public int AclBytesFree;
    }

    /// <summary>
    /// Struct SECURITY_DESCRIPTOR
    /// </summary>
    public struct SECURITY_DESCRIPTOR
    {
        /// <summary>
        /// The revision
        /// </summary>
        public byte Revision;

        /// <summary>
        /// The SBZ1
        /// </summary>
        public byte Sbz1;

        /// <summary>
        /// The control
        /// </summary>
        public int Control;

        /// <summary>
        /// The owner
        /// </summary>
        public int Owner;

        /// <summary>
        /// The group
        /// </summary>
        public int Group;

        /// <summary>
        /// The sacl
        /// </summary>
        public ACL Sacl;

        /// <summary>
        /// The dacl
        /// </summary>
        public ACL Dacl;
    }

    /// <summary>
    /// Struct PRIVILEGE_SET
    /// </summary>
    public struct PRIVILEGE_SET
    {
        /// <summary>
        /// The privilege count
        /// </summary>
        public int PrivilegeCount;

        /// <summary>
        /// The control
        /// </summary>
        public int Control;

        /// <summary>
        /// The privilege
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public LUID_AND_ATTRIBUTES[] Privilege;
    }

    /// <summary>
    /// Struct EXCEPTION_RECORD
    /// </summary>
    public struct EXCEPTION_RECORD
    {
        /// <summary>
        /// The exception code
        /// </summary>
        public int ExceptionCode;

        /// <summary>
        /// The exception flags
        /// </summary>
        public int ExceptionFlags;

        /// <summary>
        /// The p exception record
        /// </summary>
        public int pExceptionRecord;

        /// <summary>
        /// The exception address
        /// </summary>
        public int ExceptionAddress;

        /// <summary>
        /// The number parameters
        /// </summary>
        public int NumberParameters;

        /// <summary>
        /// The exception information
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 15)] public int[] ExceptionInformation;
    }

    /// <summary>
    /// Struct EXCEPTION_DEBUG_INFO
    /// </summary>
    public struct EXCEPTION_DEBUG_INFO
    {
        /// <summary>
        /// The p exception record
        /// </summary>
        public EXCEPTION_RECORD pExceptionRecord;

        /// <summary>
        /// The dw first chance
        /// </summary>
        public int dwFirstChance;
    }

    /// <summary>
    /// Struct CREATE_THREAD_DEBUG_INFO
    /// </summary>
    public struct CREATE_THREAD_DEBUG_INFO
    {
        /// <summary>
        /// The h thread
        /// </summary>
        public HANDLE hThread;

        /// <summary>
        /// The lp thread local base
        /// </summary>
        public int lpThreadLocalBase;

        /// <summary>
        /// The lp start address
        /// </summary>
        public int lpStartAddress;
    }

    /// <summary>
    /// Struct CREATE_PROCESS_DEBUG_INFO
    /// </summary>
    public struct CREATE_PROCESS_DEBUG_INFO
    {
        /// <summary>
        /// The h file
        /// </summary>
        public HANDLE hFile;

        /// <summary>
        /// The h process
        /// </summary>
        public HANDLE hProcess;

        /// <summary>
        /// The h thread
        /// </summary>
        public HANDLE hThread;

        /// <summary>
        /// The lp base of image
        /// </summary>
        public int lpBaseOfImage;

        /// <summary>
        /// The dw debug information file offset
        /// </summary>
        public int dwDebugInfoFileOffset;

        /// <summary>
        /// The n debug information size
        /// </summary>
        public int nDebugInfoSize;

        /// <summary>
        /// The lp thread local base
        /// </summary>
        public int lpThreadLocalBase;

        /// <summary>
        /// The lp start address
        /// </summary>
        public int lpStartAddress;

        /// <summary>
        /// The lp image name
        /// </summary>
        public int lpImageName;

        /// <summary>
        /// The f unicode
        /// </summary>
        public short fUnicode;
    }

    /// <summary>
    /// Struct EXIT_THREAD_DEBUG_INFO
    /// </summary>
    public struct EXIT_THREAD_DEBUG_INFO
    {
        /// <summary>
        /// The dw exit code
        /// </summary>
        public int dwExitCode;
    }

    /// <summary>
    /// Struct EXIT_PROCESS_DEBUG_INFO
    /// </summary>
    public struct EXIT_PROCESS_DEBUG_INFO
    {
        /// <summary>
        /// The dw exit code
        /// </summary>
        public int dwExitCode;
    }

    /// <summary>
    /// Struct LOAD_DLL_DEBUG_INFO
    /// </summary>
    public struct LOAD_DLL_DEBUG_INFO
    {
        /// <summary>
        /// The h file
        /// </summary>
        public HANDLE hFile;

        /// <summary>
        /// The lp base of DLL
        /// </summary>
        public int lpBaseOfDll;

        /// <summary>
        /// The dw debug information file offset
        /// </summary>
        public int dwDebugInfoFileOffset;

        /// <summary>
        /// The n debug information size
        /// </summary>
        public int nDebugInfoSize;

        /// <summary>
        /// The lp image name
        /// </summary>
        public int lpImageName;

        /// <summary>
        /// The f unicode
        /// </summary>
        public short fUnicode;
    }

    /// <summary>
    /// Struct UNLOAD_DLL_DEBUG_INFO
    /// </summary>
    public struct UNLOAD_DLL_DEBUG_INFO
    {
        /// <summary>
        /// The lp base of DLL
        /// </summary>
        public int lpBaseOfDll;
    }

    /// <summary>
    /// Struct OUTPUT_DEBUG_STRING_INFO
    /// </summary>
    public struct OUTPUT_DEBUG_STRING_INFO
    {
        /// <summary>
        /// The lp debug string data
        /// </summary>
        public string lpDebugStringData;

        /// <summary>
        /// The f unicode
        /// </summary>
        public short fUnicode;

        /// <summary>
        /// The n debug string length
        /// </summary>
        public short nDebugStringLength;
    }

    /// <summary>
    /// Struct RIP_INFO
    /// </summary>
    public struct RIP_INFO
    {
        /// <summary>
        /// The dw error
        /// </summary>
        public int dwError;

        /// <summary>
        /// The dw type
        /// </summary>
        public int dwType;
    }

    /// <summary>
    /// Struct OFSTRUCT
    /// </summary>
    public struct OFSTRUCT
    {
        /// <summary>
        /// The c bytes
        /// </summary>
        public byte cBytes;

        /// <summary>
        /// The f fixed disk
        /// </summary>
        public byte fFixedDisk;

        /// <summary>
        /// The n error code
        /// </summary>
        public short nErrCode;

        /// <summary>
        /// The reserved1
        /// </summary>
        public short Reserved1;

        /// <summary>
        /// The reserved2
        /// </summary>
        public short Reserved2;

        /// <summary>
        /// The sz path name
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] public byte[] szPathName;
    }

    /// <summary>
    /// Struct CRITICAL_SECTION
    /// </summary>
    public struct CRITICAL_SECTION
    {
        /// <summary>
        /// The p debug information
        /// </summary>
        public int pDebugInfo;

        /// <summary>
        /// The lock count
        /// </summary>
        public int LockCount;

        /// <summary>
        /// The recursion count
        /// </summary>
        public int RecursionCount;

        /// <summary>
        /// The p owning thread
        /// </summary>
        public int pOwningThread;

        /// <summary>
        /// The p lock semaphore
        /// </summary>
        public int pLockSemaphore;

        /// <summary>
        /// The reserved
        /// </summary>
        public int Reserved;
    }

    /// <summary>
    /// Struct BY_HANDLE_FILE_INFORMATION
    /// </summary>
    public struct BY_HANDLE_FILE_INFORMATION
    {
        /// <summary>
        /// The dw file attributes
        /// </summary>
        public int dwFileAttributes;

        /// <summary>
        /// The ft creation time
        /// </summary>
        public FILETIME ftCreationTime;

        /// <summary>
        /// The ft last access time
        /// </summary>
        public FILETIME ftLastAccessTime;

        /// <summary>
        /// The ft last write time
        /// </summary>
        public FILETIME ftLastWriteTime;

        /// <summary>
        /// The dw volume serial number
        /// </summary>
        public int dwVolumeSerialNumber;

        /// <summary>
        /// The n file size high
        /// </summary>
        public int nFileSizeHigh;

        /// <summary>
        /// The n file size low
        /// </summary>
        public int nFileSizeLow;

        /// <summary>
        /// The n number of links
        /// </summary>
        public int nNumberOfLinks;

        /// <summary>
        /// The n file index high
        /// </summary>
        public int nFileIndexHigh;

        /// <summary>
        /// The n file index low
        /// </summary>
        public int nFileIndexLow;
    }

    /// <summary>
    /// Struct MEMORY_BASIC_INFORMATION
    /// </summary>
    public struct MEMORY_BASIC_INFORMATION
    {
        /// <summary>
        /// The base address
        /// </summary>
        public int BaseAddress;

        /// <summary>
        /// The allocation base
        /// </summary>
        public int AllocationBase;

        /// <summary>
        /// The allocation protect
        /// </summary>
        public int AllocationProtect;

        /// <summary>
        /// The region size
        /// </summary>
        public int RegionSize;

        /// <summary>
        /// The state
        /// </summary>
        public int State;

        /// <summary>
        /// The protect
        /// </summary>
        public int Protect;

        /// <summary>
        /// The l type
        /// </summary>
        public int lType;
    }

    /// <summary>
    /// Struct EVENTLOGRECORD
    /// </summary>
    public struct EVENTLOGRECORD
    {
        /// <summary>
        /// The length
        /// </summary>
        public int Length;

        /// <summary>
        /// The reserved
        /// </summary>
        public int Reserved;

        /// <summary>
        /// The record number
        /// </summary>
        public int RecordNumber;

        /// <summary>
        /// The time generated
        /// </summary>
        public int TimeGenerated;

        /// <summary>
        /// The time written
        /// </summary>
        public int TimeWritten;

        /// <summary>
        /// The event identifier
        /// </summary>
        public int EventID;

        /// <summary>
        /// The event type
        /// </summary>
        public short EventType;

        /// <summary>
        /// The number strings
        /// </summary>
        public short NumStrings;

        /// <summary>
        /// The event category
        /// </summary>
        public short EventCategory;

        /// <summary>
        /// The reserved flags
        /// </summary>
        public short ReservedFlags;

        /// <summary>
        /// The closing record number
        /// </summary>
        public int ClosingRecordNumber;

        /// <summary>
        /// The string offset
        /// </summary>
        public int StringOffset;

        /// <summary>
        /// The user sid length
        /// </summary>
        public int UserSidLength;

        /// <summary>
        /// The user sid offset
        /// </summary>
        public int UserSidOffset;

        /// <summary>
        /// The data length
        /// </summary>
        public int DataLength;

        /// <summary>
        /// The data offset
        /// </summary>
        public int DataOffset;
    }

    /// <summary>
    /// Struct TOKEN_GROUPS
    /// </summary>
    public struct TOKEN_GROUPS
    {
        /// <summary>
        /// The group count
        /// </summary>
        public int GroupCount;

        /// <summary>
        /// The groups
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public SID_AND_ATTRIBUTES[] Groups;
    }

    /// <summary>
    /// Struct TOKEN_PRIVILEGES
    /// </summary>
    public struct TOKEN_PRIVILEGES
    {
        /// <summary>
        /// The privilege count
        /// </summary>
        public int PrivilegeCount;

        /// <summary>
        /// The privileges
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public LUID_AND_ATTRIBUTES[] Privileges;
    }

    /// <summary>
    /// Struct CONTEXT
    /// </summary>
    public struct CONTEXT
    {
        /// <summary>
        /// The FLT f0
        /// </summary>
        public double FltF0;

        /// <summary>
        /// The FLT f1
        /// </summary>
        public double FltF1;

        /// <summary>
        /// The FLT f2
        /// </summary>
        public double FltF2;

        /// <summary>
        /// The FLT f3
        /// </summary>
        public double FltF3;

        /// <summary>
        /// The FLT f4
        /// </summary>
        public double FltF4;

        /// <summary>
        /// The FLT f5
        /// </summary>
        public double FltF5;

        /// <summary>
        /// The FLT f6
        /// </summary>
        public double FltF6;

        /// <summary>
        /// The FLT f7
        /// </summary>
        public double FltF7;

        /// <summary>
        /// The FLT f8
        /// </summary>
        public double FltF8;

        /// <summary>
        /// The FLT f9
        /// </summary>
        public double FltF9;

        /// <summary>
        /// The FLT F10
        /// </summary>
        public double FltF10;

        /// <summary>
        /// The FLT F11
        /// </summary>
        public double FltF11;

        /// <summary>
        /// The FLT F12
        /// </summary>
        public double FltF12;

        /// <summary>
        /// The FLT F13
        /// </summary>
        public double FltF13;

        /// <summary>
        /// The FLT F14
        /// </summary>
        public double FltF14;

        /// <summary>
        /// The FLT F15
        /// </summary>
        public double FltF15;

        /// <summary>
        /// The FLT F16
        /// </summary>
        public double FltF16;

        /// <summary>
        /// The FLT F17
        /// </summary>
        public double FltF17;

        /// <summary>
        /// The FLT F18
        /// </summary>
        public double FltF18;

        /// <summary>
        /// The FLT F19
        /// </summary>
        public double FltF19;

        /// <summary>
        /// The FLT F20
        /// </summary>
        public double FltF20;

        /// <summary>
        /// The FLT F21
        /// </summary>
        public double FltF21;

        /// <summary>
        /// The FLT F22
        /// </summary>
        public double FltF22;

        /// <summary>
        /// The FLT F23
        /// </summary>
        public double FltF23;

        /// <summary>
        /// The FLT F24
        /// </summary>
        public double FltF24;

        /// <summary>
        /// The FLT F25
        /// </summary>
        public double FltF25;

        /// <summary>
        /// The FLT F26
        /// </summary>
        public double FltF26;

        /// <summary>
        /// The FLT F27
        /// </summary>
        public double FltF27;

        /// <summary>
        /// The FLT F28
        /// </summary>
        public double FltF28;

        /// <summary>
        /// The FLT F29
        /// </summary>
        public double FltF29;

        /// <summary>
        /// The FLT F30
        /// </summary>
        public double FltF30;

        /// <summary>
        /// The FLT F31
        /// </summary>
        public double FltF31;

        /// <summary>
        /// The int v0
        /// </summary>
        public double IntV0;

        /// <summary>
        /// The int t0
        /// </summary>
        public double IntT0;

        /// <summary>
        /// The int t1
        /// </summary>
        public double IntT1;

        /// <summary>
        /// The int t2
        /// </summary>
        public double IntT2;

        /// <summary>
        /// The int t3
        /// </summary>
        public double IntT3;

        /// <summary>
        /// The int t4
        /// </summary>
        public double IntT4;

        /// <summary>
        /// The int t5
        /// </summary>
        public double IntT5;

        /// <summary>
        /// The int t6
        /// </summary>
        public double IntT6;

        /// <summary>
        /// The int t7
        /// </summary>
        public double IntT7;

        /// <summary>
        /// The int s0
        /// </summary>
        public double IntS0;

        /// <summary>
        /// The int s1
        /// </summary>
        public double IntS1;

        /// <summary>
        /// The int s2
        /// </summary>
        public double IntS2;

        /// <summary>
        /// The int s3
        /// </summary>
        public double IntS3;

        /// <summary>
        /// The int s4
        /// </summary>
        public double IntS4;

        /// <summary>
        /// The int s5
        /// </summary>
        public double IntS5;

        /// <summary>
        /// The int fp
        /// </summary>
        public double IntFp;

        /// <summary>
        /// The int a0
        /// </summary>
        public double IntA0;

        /// <summary>
        /// The int a1
        /// </summary>
        public double IntA1;

        /// <summary>
        /// The int a2
        /// </summary>
        public double IntA2;

        /// <summary>
        /// The int a3
        /// </summary>
        public double IntA3;

        /// <summary>
        /// The int a4
        /// </summary>
        public double IntA4;

        /// <summary>
        /// The int a5
        /// </summary>
        public double IntA5;

        /// <summary>
        /// The int t8
        /// </summary>
        public double IntT8;

        /// <summary>
        /// The int t9
        /// </summary>
        public double IntT9;

        /// <summary>
        /// The int T10
        /// </summary>
        public double IntT10;

        /// <summary>
        /// The int T11
        /// </summary>
        public double IntT11;

        /// <summary>
        /// The int ra
        /// </summary>
        public double IntRa;

        /// <summary>
        /// The int T12
        /// </summary>
        public double IntT12;

        /// <summary>
        /// The int at
        /// </summary>
        public double IntAt;

        /// <summary>
        /// The int gp
        /// </summary>
        public double IntGp;

        /// <summary>
        /// The int sp
        /// </summary>
        public double IntSp;

        /// <summary>
        /// The int zero
        /// </summary>
        public double IntZero;

        /// <summary>
        /// The FPCR
        /// </summary>
        public double Fpcr;

        /// <summary>
        /// The soft FPCR
        /// </summary>
        public double SoftFpcr;

        /// <summary>
        /// The fir
        /// </summary>
        public double Fir;

        /// <summary>
        /// The PSR
        /// </summary>
        public int Psr;

        /// <summary>
        /// The context flags
        /// </summary>
        public int ContextFlags;

        /// <summary>
        /// The fill
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public int[] Fill;
    }

    /// <summary>
    /// Struct EXCEPTION_POINTERS
    /// </summary>
    public struct EXCEPTION_POINTERS
    {
        /// <summary>
        /// The p exception record
        /// </summary>
        public EXCEPTION_RECORD pExceptionRecord;

        /// <summary>
        /// The context record
        /// </summary>
        public CONTEXT ContextRecord;
    }

    /// <summary>
    /// Struct LDT_BYTES
    /// </summary>
    public struct LDT_BYTES
    {
        /// <summary>
        /// The base mid
        /// </summary>
        public byte BaseMid;

        /// <summary>
        /// The flags1
        /// </summary>
        public byte Flags1;

        /// <summary>
        /// The flags2
        /// </summary>
        public byte Flags2;

        /// <summary>
        /// The base hi
        /// </summary>
        public byte BaseHi;
    }

    /// <summary>
    /// Struct LDT_ENTRY
    /// </summary>
    public struct LDT_ENTRY
    {
        /// <summary>
        /// The limit low
        /// </summary>
        public short LimitLow;

        /// <summary>
        /// The base low
        /// </summary>
        public short BaseLow;

        /// <summary>
        /// The high word
        /// </summary>
        public int HighWord;
    }

    /// <summary>
    /// Struct TIME_ZONE_INFORMATION
    /// </summary>
    public struct TIME_ZONE_INFORMATION
    {
        /// <summary>
        /// The bias
        /// </summary>
        public int Bias;

        /// <summary>
        /// The standard name
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public short[] StandardName;


        /// <summary>
        /// The standard bias
        /// </summary>
        public int StandardBias;

        /// <summary>
        /// The daylight name
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public short[] DaylightName;


        /// <summary>
        /// The daylight bias
        /// </summary>
        public int DaylightBias;
    }

    /// <summary>
    /// Struct WIN32_STREAM_ID
    /// </summary>
    public struct WIN32_STREAM_ID
    {
        /// <summary>
        /// The dw stream identifier
        /// </summary>
        public int dwStreamID;

        /// <summary>
        /// The dw stream attributes
        /// </summary>
        public int dwStreamAttributes;

        /// <summary>
        /// The dw stream size low
        /// </summary>
        public int dwStreamSizeLow;

        /// <summary>
        /// The dw stream size high
        /// </summary>
        public int dwStreamSizeHigh;

        /// <summary>
        /// The dw stream name size
        /// </summary>
        public int dwStreamNameSize;

        /// <summary>
        /// The c stream name
        /// </summary>
        public byte cStreamName;
    }

    /// <summary>
    /// Struct STARTUPINFO
    /// </summary>
    public struct STARTUPINFO
    {
        /// <summary>
        /// The cb
        /// </summary>
        public int cb;

        /// <summary>
        /// The lp reserved
        /// </summary>
        public string lpReserved;

        /// <summary>
        /// The lp desktop
        /// </summary>
        public string lpDesktop;

        /// <summary>
        /// The lp title
        /// </summary>
        public string lpTitle;

        /// <summary>
        /// The dw x
        /// </summary>
        public int dwX;

        /// <summary>
        /// The dw y
        /// </summary>
        public int dwY;

        /// <summary>
        /// The dw x size
        /// </summary>
        public int dwXSize;

        /// <summary>
        /// The dw y size
        /// </summary>
        public int dwYSize;

        /// <summary>
        /// The dw x count chars
        /// </summary>
        public int dwXCountChars;

        /// <summary>
        /// The dw y count chars
        /// </summary>
        public int dwYCountChars;

        /// <summary>
        /// The dw fill attribute
        /// </summary>
        public int dwFillAttribute;

        /// <summary>
        /// The dw flags
        /// </summary>
        public int dwFlags;

        /// <summary>
        /// The w show window
        /// </summary>
        public short wShowWindow;

        /// <summary>
        /// The cb reserved2
        /// </summary>
        public short cbReserved2;

        /// <summary>
        /// The lp reserved2
        /// </summary>
        public int lpReserved2;

        /// <summary>
        /// The h standard input
        /// </summary>
        public HANDLE hStdInput;

        /// <summary>
        /// The h standard output
        /// </summary>
        public HANDLE hStdOutput;

        /// <summary>
        /// The h standard error
        /// </summary>
        public HANDLE hStdError;
    }

    /// <summary>
    /// Struct CPINFO
    /// </summary>
    public struct CPINFO
    {
        /// <summary>
        /// The maximum character size
        /// </summary>
        public int MaxCharSize;

        /// <summary>
        /// The default character
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = Kernel32.MAX_DEFAULTCHAR)] public byte[] DefaultChar;

        /// <summary>
        /// The lead byte
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = Kernel32.MAX_LEADBYTES)] public byte[] LeadByte;
    }

    /// <summary>
    /// Struct NUMBERFMT
    /// </summary>
    public struct NUMBERFMT
    {
        /// <summary>
        /// The number digits
        /// </summary>
        public int NumDigits;

        /// <summary>
        /// The leading zero
        /// </summary>
        public int LeadingZero;

        /// <summary>
        /// The grouping
        /// </summary>
        public int Grouping;

        /// <summary>
        /// The lp decimal sep
        /// </summary>
        public string lpDecimalSep;

        /// <summary>
        /// The lp thousand sep
        /// </summary>
        public string lpThousandSep;

        /// <summary>
        /// The negative order
        /// </summary>
        public int NegativeOrder;
    }

    /// <summary>
    /// Struct CURRENCYFMT
    /// </summary>
    public struct CURRENCYFMT
    {
        /// <summary>
        /// The number digits
        /// </summary>
        public int NumDigits;

        /// <summary>
        /// The leading zero
        /// </summary>
        public int LeadingZero;

        /// <summary>
        /// The grouping
        /// </summary>
        public int Grouping;

        /// <summary>
        /// The lp decimal sep
        /// </summary>
        public string lpDecimalSep;

        /// <summary>
        /// The lp thousand sep
        /// </summary>
        public string lpThousandSep;

        /// <summary>
        /// The negative order
        /// </summary>
        public int NegativeOrder;

        /// <summary>
        /// The positive order
        /// </summary>
        public int PositiveOrder;

        /// <summary>
        /// The lp currency symbol
        /// </summary>
        public string lpCurrencySymbol;
    }

    /// <summary>
    /// Struct COORD
    /// </summary>
    public struct COORD
    {
        /// <summary>
        /// The x
        /// </summary>
        public short x;

        /// <summary>
        /// The y
        /// </summary>
        public short y;
    }

    /// <summary>
    /// Struct SMALL_RECT
    /// </summary>
    public struct SMALL_RECT
    {
        /// <summary>
        /// The left
        /// </summary>
        public short Left;

        /// <summary>
        /// The top
        /// </summary>
        public short Top;

        /// <summary>
        /// The right
        /// </summary>
        public short Right;

        /// <summary>
        /// The bottom
        /// </summary>
        public short Bottom;
    }

    /// <summary>
    /// Struct KEY_EVENT_RECORD
    /// </summary>
    public struct KEY_EVENT_RECORD
    {
        /// <summary>
        /// The b key down
        /// </summary>
        public int bKeyDown;

        /// <summary>
        /// The w repeat count
        /// </summary>
        public short wRepeatCount;

        /// <summary>
        /// The w virtual key code
        /// </summary>
        public short wVirtualKeyCode;

        /// <summary>
        /// The w virtual scan code
        /// </summary>
        public short wVirtualScanCode;

        /// <summary>
        /// The u character
        /// </summary>
        public byte uChar;

        /// <summary>
        /// The dw control key state
        /// </summary>
        public int dwControlKeyState;
    }

    /// <summary>
    /// Struct MOUSE_EVENT_RECORD
    /// </summary>
    public struct MOUSE_EVENT_RECORD
    {
        /// <summary>
        /// The dw mouse position
        /// </summary>
        public COORD dwMousePosition;

        /// <summary>
        /// The dw button state
        /// </summary>
        public int dwButtonState;

        /// <summary>
        /// The dw control key state
        /// </summary>
        public int dwControlKeyState;

        /// <summary>
        /// The dw event flags
        /// </summary>
        public int dwEventFlags;
    }

    /// <summary>
    /// Struct WINDOW_BUFFER_SIZE_RECORD
    /// </summary>
    public struct WINDOW_BUFFER_SIZE_RECORD
    {
        /// <summary>
        /// The dw size
        /// </summary>
        public COORD dwSize;
    }

    /// <summary>
    /// Struct MENU_EVENT_RECORD
    /// </summary>
    public struct MENU_EVENT_RECORD
    {
        /// <summary>
        /// The dw command identifier
        /// </summary>
        public int dwCommandId;
    }

    /// <summary>
    /// Struct FOCUS_EVENT_RECORD
    /// </summary>
    public struct FOCUS_EVENT_RECORD
    {
        /// <summary>
        /// The b set focus
        /// </summary>
        public int bSetFocus;
    }

    /// <summary>
    /// Struct CHAR_INFO
    /// </summary>
    public struct CHAR_INFO
    {
        /// <summary>
        /// The character
        /// </summary>
        public short Char;

        /// <summary>
        /// The attributes
        /// </summary>
        public short Attributes;
    }

    /// <summary>
    /// Struct CONSOLE_SCREEN_BUFFER_INFO
    /// </summary>
    public struct CONSOLE_SCREEN_BUFFER_INFO
    {
        /// <summary>
        /// The dw size
        /// </summary>
        public COORD dwSize;

        /// <summary>
        /// The dw cursor position
        /// </summary>
        public COORD dwCursorPosition;

        /// <summary>
        /// The w attributes
        /// </summary>
        public short wAttributes;

        /// <summary>
        /// The sr window
        /// </summary>
        public SMALL_RECT srWindow;

        /// <summary>
        /// The dw maximum window size
        /// </summary>
        public COORD dwMaximumWindowSize;
    }

    /// <summary>
    /// Struct CONSOLE_CURSOR_INFO
    /// </summary>
    public struct CONSOLE_CURSOR_INFO
    {
        /// <summary>
        /// The dw size
        /// </summary>
        public int dwSize;

        /// <summary>
        /// The b visible
        /// </summary>
        public int bVisible;
    }

    /// <summary>
    /// Struct SID_IDENTIFIER_AUTHORITY
    /// </summary>
    public struct SID_IDENTIFIER_AUTHORITY
    {
        /// <summary>
        /// The value
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] Value;
    }

    /// <summary>
    /// Struct SID_AND_ATTRIBUTES
    /// </summary>
    public struct SID_AND_ATTRIBUTES
    {
        /// <summary>
        /// The sid
        /// </summary>
        public int Sid;

        /// <summary>
        /// The attributes
        /// </summary>
        public int Attributes;
    }

    /// <summary>
    /// Struct WIN32_FIND_DATA
    /// </summary>
    public struct WIN32_FIND_DATA
    {
        /// <summary>
        /// The dw file attributes
        /// </summary>
        public int dwFileAttributes;

        /// <summary>
        /// The ft creation time
        /// </summary>
        public FILETIME ftCreationTime;

        /// <summary>
        /// The ft last access time
        /// </summary>
        public FILETIME ftLastAccessTime;

        /// <summary>
        /// The ft last write time
        /// </summary>
        public FILETIME ftLastWriteTime;

        /// <summary>
        /// The n file size high
        /// </summary>
        public int nFileSizeHigh;

        /// <summary>
        /// The n file size low
        /// </summary>
        public int nFileSizeLow;

        /// <summary>
        /// The dw reserved0
        /// </summary>
        public int dwReserved0;

        /// <summary>
        /// The dw reserved1
        /// </summary>
        public int dwReserved1;

        /// <summary>
        /// The c file name
        /// </summary>
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Kernel32.MAX_PATH)] public string cFileName;

        /// <summary>
        /// The c alternate
        /// </summary>
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 14)] public string cAlternate;
    }

    /// <summary>
    /// Struct COMMCONFIG
    /// </summary>
    public struct COMMCONFIG
    {
        /// <summary>
        /// The dw size
        /// </summary>
        public int dwSize;

        /// <summary>
        /// The w version
        /// </summary>
        public short wVersion;

        /// <summary>
        /// The w reserved
        /// </summary>
        public short wReserved;

        /// <summary>
        /// The DCBX
        /// </summary>
        public DCB dcbx;

        /// <summary>
        /// The dw provider sub type
        /// </summary>
        public int dwProviderSubType;

        /// <summary>
        /// The dw provider offset
        /// </summary>
        public int dwProviderOffset;

        /// <summary>
        /// The dw provider size
        /// </summary>
        public int dwProviderSize;

        /// <summary>
        /// The wc provider data
        /// </summary>
        public byte wcProviderData;
    }

    /// <summary>
    /// Struct SERVICE_STATUS
    /// </summary>
    public struct SERVICE_STATUS
    {
        /// <summary>
        /// The dw service type
        /// </summary>
        public int dwServiceType;

        /// <summary>
        /// The dw current state
        /// </summary>
        public int dwCurrentState;

        /// <summary>
        /// The dw controls accepted
        /// </summary>
        public int dwControlsAccepted;

        /// <summary>
        /// The dw win32 exit code
        /// </summary>
        public int dwWin32ExitCode;

        /// <summary>
        /// The dw service specific exit code
        /// </summary>
        public int dwServiceSpecificExitCode;

        /// <summary>
        /// The dw check point
        /// </summary>
        public int dwCheckPoint;

        /// <summary>
        /// The dw wait hint
        /// </summary>
        public int dwWaitHint;
    }

    /// <summary>
    /// Struct ENUM_SERVICE_STATUS
    /// </summary>
    public struct ENUM_SERVICE_STATUS
    {
        /// <summary>
        /// The lp service name
        /// </summary>
        public string lpServiceName;

        /// <summary>
        /// The lp display name
        /// </summary>
        public string lpDisplayName;

        /// <summary>
        /// The service status
        /// </summary>
        public SERVICE_STATUS ServiceStatus;
    }

    /// <summary>
    /// Struct QUERY_SERVICE_LOCK_STATUS
    /// </summary>
    public struct QUERY_SERVICE_LOCK_STATUS
    {
        /// <summary>
        /// The f is locked
        /// </summary>
        public int fIsLocked;

        /// <summary>
        /// The lp lock owner
        /// </summary>
        public string lpLockOwner;

        /// <summary>
        /// The dw lock duration
        /// </summary>
        public int dwLockDuration;
    }

    /// <summary>
    /// Struct QUERY_SERVICE_CONFIG
    /// </summary>
    public struct QUERY_SERVICE_CONFIG
    {
        /// <summary>
        /// The dw service type
        /// </summary>
        public int dwServiceType;

        /// <summary>
        /// The dw start type
        /// </summary>
        public int dwStartType;

        /// <summary>
        /// The dw error control
        /// </summary>
        public int dwErrorControl;

        /// <summary>
        /// The lp binary path name
        /// </summary>
        public string lpBinaryPathName;

        /// <summary>
        /// The lp load order group
        /// </summary>
        public string lpLoadOrderGroup;

        /// <summary>
        /// The dw tag identifier
        /// </summary>
        public int dwTagId;

        /// <summary>
        /// The lp dependencies
        /// </summary>
        public string lpDependencies;

        /// <summary>
        /// The lp service start name
        /// </summary>
        public string lpServiceStartName;

        /// <summary>
        /// The lp display name
        /// </summary>
        public string lpDisplayName;
    }

    /// <summary>
    /// Struct SERVICE_TABLE_ENTRY
    /// </summary>
    public struct SERVICE_TABLE_ENTRY
    {
        /// <summary>
        /// The lp service name
        /// </summary>
        public string lpServiceName;

        /// <summary>
        /// The lp service proc
        /// </summary>
        public int lpServiceProc;
    }

    /// <summary>
    /// Struct LARGE_INTEGER
    /// </summary>
    public struct LARGE_INTEGER
    {
        /// <summary>
        /// The lowpart
        /// </summary>
        public int lowpart;

        /// <summary>
        /// The highpart
        /// </summary>
        public int highpart;
    }

    /// <summary>
    /// Struct PERF_DATA_BLOCK
    /// </summary>
    public struct PERF_DATA_BLOCK
    {
        /// <summary>
        /// The signature
        /// </summary>
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)] public string Signature;

        /// <summary>
        /// The little endian
        /// </summary>
        public int LittleEndian;

        /// <summary>
        /// The version
        /// </summary>
        public int Version;

        /// <summary>
        /// The revision
        /// </summary>
        public int Revision;

        /// <summary>
        /// The total byte length
        /// </summary>
        public int TotalByteLength;

        /// <summary>
        /// The header length
        /// </summary>
        public int HeaderLength;

        /// <summary>
        /// The number object types
        /// </summary>
        public int NumObjectTypes;

        /// <summary>
        /// The default object
        /// </summary>
        public int DefaultObject;

        /// <summary>
        /// The perf time
        /// </summary>
        public LARGE_INTEGER PerfTime;

        /// <summary>
        /// The perf freq
        /// </summary>
        public LARGE_INTEGER PerfFreq;

        /// <summary>
        /// The per time100n sec
        /// </summary>
        public LARGE_INTEGER PerTime100nSec;

        /// <summary>
        /// The system name length
        /// </summary>
        public int SystemNameLength;

        /// <summary>
        /// The system name offset
        /// </summary>
        public int SystemNameOffset;
    }

    /// <summary>
    /// Struct PERF_OBJECT_TYPE
    /// </summary>
    public struct PERF_OBJECT_TYPE
    {
        /// <summary>
        /// The total byte length
        /// </summary>
        public int TotalByteLength;

        /// <summary>
        /// The definition length
        /// </summary>
        public int DefinitionLength;

        /// <summary>
        /// The header length
        /// </summary>
        public int HeaderLength;

        /// <summary>
        /// The object name title index
        /// </summary>
        public int ObjectNameTitleIndex;

        /// <summary>
        /// The object name title
        /// </summary>
        public string ObjectNameTitle;

        /// <summary>
        /// The object help title index
        /// </summary>
        public int ObjectHelpTitleIndex;

        /// <summary>
        /// The object help title
        /// </summary>
        public string ObjectHelpTitle;

        /// <summary>
        /// The detail level
        /// </summary>
        public int DetailLevel;

        /// <summary>
        /// The number counters
        /// </summary>
        public int NumCounters;

        /// <summary>
        /// The default counter
        /// </summary>
        public int DefaultCounter;

        /// <summary>
        /// The number instances
        /// </summary>
        public int NumInstances;

        /// <summary>
        /// The code page
        /// </summary>
        public int CodePage;

        /// <summary>
        /// The perf time
        /// </summary>
        public LARGE_INTEGER PerfTime;

        /// <summary>
        /// The perf freq
        /// </summary>
        public LARGE_INTEGER PerfFreq;
    }

    /// <summary>
    /// Struct PERF_COUNTER_DEFINITION
    /// </summary>
    public struct PERF_COUNTER_DEFINITION
    {
        /// <summary>
        /// The byte length
        /// </summary>
        public int ByteLength;

        /// <summary>
        /// The counter name title index
        /// </summary>
        public int CounterNameTitleIndex;

        /// <summary>
        /// The counter name title
        /// </summary>
        public string CounterNameTitle;

        /// <summary>
        /// The counter help title index
        /// </summary>
        public int CounterHelpTitleIndex;

        /// <summary>
        /// The counter help title
        /// </summary>
        public string CounterHelpTitle;

        /// <summary>
        /// The default scale
        /// </summary>
        public int DefaultScale;

        /// <summary>
        /// The detail level
        /// </summary>
        public int DetailLevel;

        /// <summary>
        /// The counter type
        /// </summary>
        public int CounterType;

        /// <summary>
        /// The counter size
        /// </summary>
        public int CounterSize;

        /// <summary>
        /// The counter offset
        /// </summary>
        public int CounterOffset;
    }

    /// <summary>
    /// Struct PERF_INSTANCE_DEFINITION
    /// </summary>
    public struct PERF_INSTANCE_DEFINITION
    {
        /// <summary>
        /// The byte length
        /// </summary>
        public int ByteLength;

        /// <summary>
        /// The parent object title index
        /// </summary>
        public int ParentObjectTitleIndex;

        /// <summary>
        /// The parent object instance
        /// </summary>
        public int ParentObjectInstance;

        /// <summary>
        /// The unique identifier
        /// </summary>
        public int UniqueID;

        /// <summary>
        /// The name offset
        /// </summary>
        public int NameOffset;

        /// <summary>
        /// The name length
        /// </summary>
        public int NameLength;
    }

    /// <summary>
    /// Struct PERF_COUNTER_BLOCK
    /// </summary>
    public struct PERF_COUNTER_BLOCK
    {
        /// <summary>
        /// The byte length
        /// </summary>
        public int ByteLength;
    }

    /// <summary>
    /// Struct OSVERSIONINFO
    /// </summary>
    public struct OSVERSIONINFO
    {
        /// <summary>
        /// The dw os version information size
        /// </summary>
        public int dwOSVersionInfoSize;

        /// <summary>
        /// The dw major version
        /// </summary>
        public int dwMajorVersion;

        /// <summary>
        /// The dw minor version
        /// </summary>
        public int dwMinorVersion;

        /// <summary>
        /// The dw build number
        /// </summary>
        public int dwBuildNumber;

        /// <summary>
        /// The dw platform identifier
        /// </summary>
        public int dwPlatformId;

        /// <summary>
        /// The sz CSD version
        /// </summary>
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string szCSDVersion;
    }

    /// <summary>
    /// Struct SYSTEM_POWER_STATUS
    /// </summary>
    public struct SYSTEM_POWER_STATUS
    {
        /// <summary>
        /// The ac line status
        /// </summary>
        public byte ACLineStatus;

        /// <summary>
        /// The battery flag
        /// </summary>
        public byte BatteryFlag;

        /// <summary>
        /// The battery life percent
        /// </summary>
        public byte BatteryLifePercent;

        /// <summary>
        /// The reserved1
        /// </summary>
        public byte Reserved1;

        /// <summary>
        /// The battery life time
        /// </summary>
        public int BatteryLifeTime;

        /// <summary>
        /// The battery full life time
        /// </summary>
        public int BatteryFullLifeTime;
    }
}
